package com.yanq.liancar.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yanq.liancar.R;
import com.yanq.liancar.bean.ServiceforBuyBean;

import java.util.List;

public class ServiceVoucherAdapter extends BaseQuickAdapter<ServiceforBuyBean.DataBean.ServiceVoucherBean, BaseViewHolder> {
    public ServiceVoucherAdapter(int layoutResId, @Nullable List<ServiceforBuyBean.DataBean.ServiceVoucherBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ServiceforBuyBean.DataBean.ServiceVoucherBean item) {
        helper.setText(R.id.tv_name,item.getService_name())
                .setText(R.id.tv_Use,item.getService_content())
                .setText(R.id.tv_Termofvalidity,item.getIndate_start()+"-"+item.getIndate_end());

    }

}
